﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using ListaCasamentoCL;

namespace ListaCasamento
{
    /// <summary>
    /// Summary description for Service
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    [System.Web.Script.Services.ScriptService]
    public class Service : System.Web.Services.WebService
    {

        [WebMethod]
        public string SalvarOfertante(string nome, string id)
        {
            try
            {
                Presente.Save(int.Parse(id), nome);
                return "Salvo";
            }
            catch
            {
                return "Erro";
            }
        }
    }
}
